1. Field of the Invention
The invention relates to a compression encoding apparatus and an encoding method for highly efficiently compressing an image signal and a decoding apparatus and a decoding method for decoding image information in a system for transmitting the image information according to the rule of, for instance, the MPEG, JPEG, or the like.
2. Description of the Related Art
In a system for transmitting image information, a compression encoding apparatus for compression encoding an image signal and a decoding apparatus for decoding the image signal from the compression encoded signal are indispensable elements. In order to enable the compression encoding apparatus and decoding apparatus to cope with multimedia, namely, to be applied to various image information transmitting means or receiving means, the MPEG, JPEG, or the like has been determined as a rule to be obeyed.
The MPEG is a rule regarding a transmitting method of, for example, a motion image such as a video image or the like. As a compression encoding method, there is used a combination of a motion compensation interframe predictive encoding method for performing an information compression using a time correlation, an encoding method by a discrete cosine transformation (hereinafter, referred to as a DCT) as an orthogonal encoding for performing an information compression using a spatial correlation, and a Huffman encoding method as an entropy encoding (variable length encoding) for performing an information compression using a deviation of an appearance probability of a code that is formed by the above encoding method.
Among them, the motion compensation interframe predictive encoding method is necessary in a system for transmitting a motion image and is used in the MPEG or the like. The motion compensation interframe predictive encoding is executed by using each frame in the signal as a unit with reference to the other frames. In the MPEG, with respect to the motion compensation interframe predictive encoding, three picture types of an I picture, a P picture, and a B picture are refines as for each frame.
The I picture is an image which is intraframe encoded, namely, which is encoded without referring to the other frames and is not a target of the motion compensation interframe predictive encoding. The P picture is an image which is motion compensation interframe predictive encoded by a forward prediction, namely, by referring to the preceding frame. Further, the B picture is an image which is both-direction predicted. That is, the B picture is an image which is motion compensation interframe predictive encoded by referring to the preceding frame and the subsequent frames.
The picture types of the frame in which the other frames are referred to in order to perform the motion compensation interframe predictive encoding are the I picture and the P picture. The B picture cannot be referred to. That is, the frame which is referred to in order to perform the motion compensation interframe predictive encoding the P picture is the preceding I picture or P picture. In order to execute the motion compensation interframe predictive encoding the B picture, it is necessary to refer to the preceding frame (I picture or P picture) and the subsequent frame (I picture or P picture).
Therefore, the process for motion compensation interframe predictive encoding the B picture can be executed only after the frame (I picture or P picture) existing at the subsequent position in the inputted image signal was processed. Therefore, the order of the frames in the image signal which is inputted differs from the processing order. Therefore, after the reordering of the order of the frames in the inputted image signal was performed, the resultant signal is supplied to means for performing the motion compensation interframe predictive encoding. As will be explained hereinlater, a memory is used when performing such a reordering process.
After the motion compensation interframe predictive encoding was performed, the compression encoding apparatus according to the rule of the MPEG executes the encoding by the DCT and the Huffman encoding as an entropy encoding (variable length encoding) as mentioned above, thereby forming the compression encoded signal. The compression encoded signal is transmitted.
Therefore, the image signal which is formed by decoding the transmitted compression encoded signal by the decoding apparatus is the signal in which the order of the frames is reordered. Thus, a process to return the order of the frames to the original order is necessary. As will be explained hereinlater, when the process to return the order of the frames is executed, a memory which is provided in association with the decoding apparatus is used.
The JPEG is the rule regarding the transmission of, for instance, a still image in a facsimile transmission or the like. Different from the MPEG which deals with the motion image, since there is no need to perform the motion compensation interframe predictive encoding method, a combination of the encoding method by the DCT and the Huffman encoding method is used as a compression encoding method.
The processes by the compression encoding and decoding apparatuses as mentioned above progress by transmitting and receiving data to/from the memory as shown in FIG. 15. Therefore, a memory is provided in association with the compression encoding and decoding apparatuses. Roles which are performed by the memory will now be described hereinbelow.
As described above, first, in the compression encoding apparatus which deals with the motion image, the memory is used to temporarily store the input image signal for the purpose of reordering of the frames which are necessary due to the use of the motion compensation interframe predictive encoding method. That is, the order of the frames when they are taken out from the memory is controlled so as to be suitable for executing the motion compensation interframe predictive encoding. The memory also plays a role of storing the frame (local decoded image which will be explained hereinlater which is referred to as a reference to execute the motion compensation interframe predictive encoding method.
Further, the memory is also used to assure the image signal for a predetermined time prior to the process by the compression encoding and decoding apparatuses in order to recognize the nature of each frame including, for example, a scene change or the like. As mentioned above, the memory is also used in the compression encoding apparatus which deals with any one of a motion image and a still image.
On the other hand, the memory which is provided in association with the decoding apparatus which handles the motion image is used to store the signal that is referred as a reference in the decoding corresponding to the motion compensation interframe predictive encoding in the decoding corresponding to the compression encoding as mentioned above. After completion of the decoding, the memory is also used to temporarily store the decoded image signal for the process to return the order of the frames to the original order in the image signal. That is, it is controlled so that the order when taking out the decoded image signal from the memory is returned to the original order of the image signal.
It is assumed that the memory which is provided in association with the compression encoding and decoding apparatuses stores the frames in a range from a few frames to tens of frames in accordance with conditions such as performance of the image transmission system, nature of an image to be treated, and the like. Therefore, generally, a memory having a large memory capacity is necessary as such a memory. For instance, the compression encoding and decoding apparatuses which have conventionally been used need a memory of a capacity of at least 16 to 32 Mbits and, in a large case, 320 Mbits.
As mentioned above, the compression encoding and decoding apparatuses which are used in the image information transmission system according to the rule of the MPEG, JPEG, or the like need the memory of a large memory capacity for performing the processes. Therefore, the costs of the memory provided in association with the compression encoding and decoding apparatuses become one of factors of the increase in costs of the whole system.